﻿<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
    <!--_meta 作为公共模版分离出去-->
    <% layout("/common/_meta.html",{title:"添加商品类型"}){} %>
    <!--_meta 作为公共模版分离出去-->
</head>
<body style="background-color:#fff">
<div class="wap-container">
    <div class="panel">
        <div class="panel-body">
            <form action="${ctxPath}/certType/add" method="post" class="form form-horizontal" id="form-certType-add">
                <div class="row clearfix">
                    <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>名称：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="text" class="input-text" value="${certType.name!}" placeholder="名称" id="name" name="name">
                    </div>
                </div>
                <div class="row clearfix">
                    <label class="form-label col-xs-3 col-sm-3">说明：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <textarea id="description" name="description" cols="" rows="" class="textarea"  placeholder="说明">${certType.description!}</textarea>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-xs-8 col-sm-8 col-xs-offset-3 col-sm-offset-3">
                        <button type="submit" class="btn btn-success btn-block radius">添加商品类型</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
<% layout("/common/_footer.html"){} %>
<% layout("/common/_validate.html"){} %>
<!--/_footer 作为公共模版分离出去-->
<script type="text/javascript">
    $(function(){

        $("#form-certType-add").validate({
            rules:{
                name:{
                    required:true,
                    maxlength:50
                },
                description:{
                    maxlength:255
                },
            },
            submitHandler:function(form){
                loading();
                form.submit();
            }
        });
    });
</script>
</body>
</html>
